1. Field of the Invention
The present invention relates to a window control device for displaying a plurality of windows superimposed on one another on a display screen.
2. Description of the Related Art
In a device having a window processing function, a plurality of windows are displayed on a display screen D by superimposing one window on another as shown in FIG. 4, for example. When a window W2 which is intended to be displayed is overlapped by windows W0 and W1 as shown in FIG. 4, the profile of the portion of the window W2 which is not covered by the windows W0 and W1 is complicated.
A problem arises when such a window with a complicated profile is intended to be displayed by a software in a device with low power consumption such as a portable terminal. That is, since high-speed processing of a CPU is difficult in such a device, the load on the CPU becomes large. This not only markedly increases the image processing time but also adversely affects the processing speed of the entire system.
In order to overcome the above problem, the applicant of the present invention proposed a technique where the window processing function is realized by a simple hardware configuration so as to obtain a high-speed image display without increasing the processing speed of the CPU (Japanese Laid-Open Publication No. 4-97288).
In this conventional technique, a coordinate data register is provided for storing data on the coordinates of rectangular window regions on a display screen. The coordinate data of a window region is composed of a total of four values representing the top, bottom, left, and right ends of the window region. When a plurality of window regions are superimposed on one another, coordinate data registers of the number equal to the number of window regions are required for storing the coordinate data which are each composed of the four values.
The above technique further provides an operation circuit which, when pixel data is allocated to each pixel and displayed, compares the coordinates of the pixel with the coordinate data of a window region to determine whether the pixel is inside or outside the window region. This determination by the operation circuit is based on the comparison of the x coordinate of the pixel with the right and left ends of the window region and the comparison of the y coordinate of the pixel with the top and bottom ends of the window region. Accordingly, a total of four operation circuits (subtraction circuits) for the top, bottom, left, and right ends are required. By synthesizing the comparison results obtained by the four operation circuits, it is possible to determine whether the pixel is located inside or outside the window region.
Since the above determination is required for the plurality of window regions, a current window pointer is employed. That is, the current window pointer is increased by one when the determination for one window region is completed, to thereby proceed to the determination for the next window region. After the determinations for an intended number of window regions has been completed, the determination results are synthesized. Based on the synthesized results, data indicating whether pixel data for a pixel in the window region should be displayed or masked is produced. Such data is called mask data.
The mask data is used at the control of a display data memory (VRAM) by a VRAM control circuit.
FIG. 5 is a flowchart showing a procedure for producing the mask data and the control of the VRAM by the VRAM control circuit.
First, when an instruction for renewing the pixel data for at least one pixel is received (step 41), the current window pointer and the mask data are initialized (step 42). The mask data is produced by determining whether the pixel is inside or outside the window region indicated by the current window pointer (steps 43 and 44). Then, whether or not the determination is completed for all the window regions is judged (step 45). If the determination is not completed (N), the current window point is increased by one (step 46), and whether or not the pixel is inside or outside the next window region is determined to thereby produce mask data. This mask data is then superimposed on the mask data previously obtained at step 44 to renew the mask data (step 47). The process then returns to step 45, where whether or not the determinations for all the window regions are completed is judged. If the determination is completed (Y), the display data memory is accessed (step 48), and whether or not pixel data for one pixel should be displayed is determined based on the final mask data. If it is determined to display the pixel data for the pixel, the pixel data is written in an address representing the pixel in the display data memory. If it is determined to mask the pixel data for the pixel, the pixel data is not written.
In the conventional procedure shown in FIG. 5, the process returns to step 41 every time pixel data for one pixel is written. This requires the procedure to repeat the operations at steps 41 to 48 for every pixel in the number of window regions. The final production of the mask data is therefore repeated for every pixel. Accordingly, as the number of window regions which are superimposed on one another on the display screen becomes larger, the operation time becomes longer, resulting in a decrease in the display speed on the display screen and an increase in power consumption.
In view of the foregoing, the purpose of the present invention is to provide a window control device which does not extend the operation time, lower the display speed on the display screen, or increase the power consumption even if the number of window regions on the display screen increases.